package com.cqie.hospitalescort.enums;

import lombok.Getter;

@Getter
public enum LevelEnum {
    ONE(1, "一甲"),

    TWO(2, "二甲"),

    THREE(3, "三甲");

    private final int level;

    private final String desc;

    LevelEnum(int level, String desc) {
        this.level = level;
        this.desc = desc;
    }

    public static String getDesc(int level) {
        for (LevelEnum levelEnum : LevelEnum.values()) {
            if (levelEnum.getLevel() == level) {
                return levelEnum.getDesc();
            }
        }
        return null;
    }
}
